{{extends file="admin/admin_header.tpl"}}
{{block name="content"}}
<h3>
	用户管理
	<div class="pull-right">
		<a href="{{site_url('user/add')}}" class="btn btn-sm btn-success">
			添加新用户
		</a>
		<a href="{{site_url('admin/LogPage')}}" class="btn btn-sm btn-success">
			操作日志
		</a>
	</div>
</h3>
<div class="table-responsive">
		<table class="table table-striped table-bordered table-hover">
		<thead>
			<tr>
				<th>ID</th>
				<th>身份</th>
				<th>用户名称</th>
				<th>最后登陆时间</th>
				<th style="text-align: center;">操作</th>
			</tr>
		</thead>
		<tbody>
		{{foreach $user as $v}}
			<tr>
				<td>{{$v.Id}}</td>
				<td>{{$v.Type}}</td>
				<td>{{$v.UserName}}</td>
				<td>{{date("Y-m-d H:i:s",$v.lastlogin)}}</td>
				<td style="text-align: center;width: 10%;">
					<a href="{{site_url("user/edit?Id={{$v.Id}}")}}" class="btn btn-xs btn-primary">编辑</a>
					<a href="{{site_url("user/delete?Id={{$v.Id}}")}}" class="btn btn-xs btn-danger">删除</a>
				</td>
			</tr>
		{{/foreach}}
		</tbody>
	</table>
</div>
{{/block}}
